package org.oslims.client.view.impl;

import org.oslims.client.uicomponents.editbox.EditLabResponsibleBox;
import org.oslims.client.view.LabResponsibleEditorView;
import org.oslims.domain.LabResponsible;

import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.SimplePager;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.VerticalPanel;

public class LabResponsibleEditorViewImpl extends BaseViewImpl implements LabResponsibleEditorView {

	final Button addLabResponsibleButton = new Button("Add Lab Responsible");
	Integer defaultPageSize = 15;
	final CellTable<LabResponsible> labResponsibleTable = new CellTable<LabResponsible>(defaultPageSize);
	final SimplePager<LabResponsible> pager = new SimplePager<LabResponsible>(labResponsibleTable);
	EditLabResponsibleBox editLabResponsibleBox = new EditLabResponsibleBox();

	public LabResponsibleEditorViewImpl() {
		VerticalPanel vp = new VerticalPanel();

		vp.add(labResponsibleTable);
		vp.add(pager);
		vp.add(addLabResponsibleButton);
		initWidget(vp);
	}

	@Override
	public HasClickHandlers getAddLabResponsibleButton() {
		return addLabResponsibleButton;
	}

	@Override
	public CellTable<LabResponsible> getTable() {
		return labResponsibleTable;
	}

	@Override
	public EditLabResponsibleBox getEditLabResponsibleBox() {
		return editLabResponsibleBox;
	}

	@Override
	public Integer getDefaultPageSize() {
		return defaultPageSize;
	}

	@Override
	public SimplePager<LabResponsible> getPager() {
		return pager;
	}

}
